!function (t) {
    function e(o) {
        if (i[o])return i[o].exports;
        var n = i[o] = {exports: {}, id: o, loaded: !1};
        return t[o].call(n.exports, n, n.exports, e), n.loaded = !0, n.exports
    }

    var i = {};
    return e.m = t, e.c = i, e.p = "", e(0)
}([function (t, e, i) {
    i(1)
}, function (t, e, i) {
    function o(t, e) {
        t = String(t), e = e || {};
        var i = /\{([^}]+)\}/g, o = t.replace(i, function (t, i) {
            return e.hasOwnProperty(i) ? e[i] : t
        });
        return o
    }

    function n(t) {
        var e = /\./g;
        return t.replace(e, "_")
    }

    function s(t, e) {
        this.$element = $(t), this.options = e, this.payOptions = this.getPayOpts(), this.listen()
    }

    function p() {
        var t = m.getPtagAndReffer(), e = n(location.hostname), i = "", o = "";
        return t.ptag ? ($.each(m.KeyMap, function (e, o) {
                var n = new RegExp(e, "gi");
                if (n.test(t.ptag))return i = o, !1
            }), o = t.ptag) : t.reffer ? ($.each(m.KeyMap, function (e, o) {
                    var n = new RegExp(e, "gi");
                    if (n.test(t.reffer))return i = o, !1
                }), i || (o = t.reffer)) : ($.each(m.KeyMap, function (t, o) {
                    var n = new RegExp(t, "gi");
                    if (n.test(e))return i = o, !1
                }), i || (o = e)), {channel: i, pr: o}
    }

    function a(t) {
        var e = t.split(" "), i = e[0].split("-"), o = e[1].split(":");
        return +new Date(i[0], i[1] - 1, i[2], o[0], o[1], o[2])
    }

    function r(t) {
        var e = a(t.start), i = a(t.end), o = +new Date;
        return o >= e && o <= i
    }

    function c() {
        var t = window.globalConfig && window.globalConfig.payLink;
        return t && r(t) ? t.link : x.pack
    }

    function d(t) {
        this.pay = t
    }

    function u(t, e) {
        var i = $(t), o = $.extend({}, s.DEFAULTS, {
            ru: decodeURIComponent(txv.util.getUrlParam("ru")) || s.DEFAULTS.ru,
            sandbox: +decodeURIComponent(txv.util.getUrlParam("sandbox")) || s.DEFAULTS.sandbox
        }, i.data(), e);
        return new s(t, o)
    }

    function h(t, e) {
        var i = txv.cookie.get("oversea_limit");
        i && ("1" == i ? t && t() : e && e()), $.ajax({
            url: "//vv.video.qq.com/checktime?_t=1&otype=json",
            dataType: "jsonp",
            success: function (o) {
                o && "o" == o.s && 0 != o.limit ? (txv.cookie.set("oversea_limit", "1", location.host), !i && t && t()) : (txv.cookie.set("oversea_limit", "0", location.host), !i && e && e())
            },
            error: function (t, o, n) {
                !i && e && e()
            }
        })
    }

    function l(t) {
        g(t)
    }

    function g(t, e) {
        e = e || "web";
        var i = "";
        i = '<div id="oversea_popup" style="position: fixed; _position: absolute;z-index: 10001; left: 50%;top: 50%;margin-left:-250px;margin-top:-130px;">', i += '    <iframe frameborder="0" allowtransparency="true" class="iframe_wrap" src="//film.qq.com/pay/layer_oversea.html" scrolling="no" style="width: 500px; height: 260px; z-index:10001;"></iframe>', i += "</div>";
        try {
            txv.login.showMask()
        } catch (o) {
        }
        $("body").append(i), $("#oversea_popup").off("close").on("close", function () {
            $("#oversea_popup").remove();
            try {
                txv.login.hideMask()
            } catch (t) {
            }
        }).off("click_ok").on("click_ok", function () {
            $("#oversea_popup").remove();
            try {
                txv.login.hideMask()
            } catch (e) {
            }
            t && t()
        })
    }

    function f() {
        var t = window.location.href, e = "", i = t;
        if ("undefined" != typeof PLAYER)try {
            e = PLAYER.getCurrentTime()
        } catch (o) {
        }
        t.indexOf("start") > 0 && e > 0 && (i = txv.util.setUrlParam("start", e, t)), window.location.href = i, window.location.reload()
    }

    var y = i(2), m = (i(3), i(7));
    i(8);
    var v = $.extend({}, txv && txv.login);
    v.isLowLogin = v.isLowLogin || function () {
            return !1
        }, $.extend(txv.util, {
        showFixedWindow: function (t, e, i, o) {
            if (t) {
                var n, s = window == top, p = s ? document : top.document, a = p.body.scrollTop, r = p.documentElement.clientHeight, c = $(t);
                e = e || c.width() || 373, i = i || c.height() || 235, o = o === !1, 0 == a && (a = p.documentElement.scrollTop), 0 == r && (r = p.body.clientHeight), n = parseInt(c.css("zIndex")), c.css({
                    width: e + "px",
                    height: i + "px",
                    top: "50%",
                    left: "50%",
                    marginLeft: -e / 2 + "px",
                    marginTop: -i / 2 + "px",
                    position: "fixed",
                    zIndex: n || "10001",
                    display: "block"
                })
            }
        }, showAtFstSrnCenter: function (t, e, i, o) {
            if (t) {
                var n, s = window == top, p = s ? document : top.document, a = p.body.scrollTop, r = p.documentElement.clientHeight, c = $(t);
                e = e || c.width() || 373, i = i || c.height() || 235, o = o === !1, 0 == a && (a = p.documentElement.scrollTop), 0 == r && (r = p.body.clientHeight), n = parseInt(c.css("zIndex")), c.css({
                    width: e + "px",
                    height: i + "px",
                    top: r / 2 + a - i / 2 + "px",
                    left: "50%",
                    marginLeft: -e / 2 + "px",
                    marginTop: "0px",
                    position: "absolute",
                    zIndex: n || "10001",
                    display: "block"
                })
            }
        }, toJson: function (t) {
            if ("object" == typeof t) {
                var e = "";
                for (val in t)"string" == typeof t[val] ? e += '"' + val + '":"' + t[val] + '",' : "number" == typeof t[val] ? e += '"' + val + '":' + t[val] + "," : "object" == typeof t[val] && (e += this.toJson(t[val]));
                return e.length > 0 && (e = e.substr(0, e.length - 1)), e = "{" + e + "}"
            }
        }, setUrlParam: function (t, e, i) {
            i = i || location.href;
            var o, n, s = new RegExp("[?&#]" + t + "=([^&#]+)", "gi"), p = i.match(s), a = "{key" + (new Date).getTime() + "}";
            if (o = p && p.length > 0 ? p[p.length - 1] : "", n = t + "=" + e, o) {
                var r = o.charAt(0);
                i = i.replace(o, a), i = i.replace(a, e ? r + n : "")
            } else e && (i += i.indexOf("?") > -1 ? "&" + n : "?" + n);
            return i
        }
    }), $.extend(txv.login, {
        bye_login: function () {
            $("#login_win").remove(), txv.login.isOpend = !1, txv.login.hideMask(), txv.login.onCloseLogin()
        }
    });
    var x = {
        pack: "http://film.qq.com/vip.html",
        paycenter: "http://pay.qq.com/ipay/index.shtml?n=3&c=txsp&ch=qdqb,kj",
        h5pay: "http://pay.qq.com/h5/index.shtml?c=txsp&as=1&m=buy&showwxpaytitle=1&pf=2010",
        weixin: "http://film.qq.com/weixin/pay.html?showwxpaytitle=1"
    }, w = "$$", _ = {prev: "try", attempt: "confirm", confirm: "final"};
    s.DEFAULTS = {
        source: "",
        type: "minipay",
        amount: "3",
        target: "_self",
        cid: "",
        ru: location.href,
        pageType: m.getPageType(),
        goplay: 0,
        showMask: !0,
        wxAppid: "wx68ff4e3ba9f84df4",
        sandbox: 0
    };
    var k = {
        key1: "channel",
        key2: "platform",
        key3: "version",
        key4: "source1",
        key5: "cid",
        key6: "vid",
        key7: "pid",
        key8: "source2",
        key9: "typeid",
        key10: "listid",
        key11: "scene",
        key12: "pr",
        key13: "actid"
    }, q = /^mp[A-Z]/;
    s.prototype.getPayOpts = function () {
        function t(t) {
            return t.slice(2).toLowerCase()
        }

        var e = {};
        return $.each(this.options, function (i, o) {
            q.test(i) && (e[i.replace(q, t)] = o)
        }), e
    }, s.prototype.isNewAidReport = function () {
        return !!(this.options._source || this.options.key4 || this.options.aid_version || this.$element.attr("_source") || this.$element.attr("key4"))
    }, s.prototype.show = function () {
        var t, e = this.options.type, i = $.Event("invoke.hw.pay"), o = $.extend({}, {aid: this.generateAid()}, this.options), n = this;
        if (this.$element.trigger(i, o), !i.isDefaultPrevented()) {
            if ("minipay" !== e) {
                var s = "";
                "package" === e ? s = _.prev : "h5pay" === e && (s = _.attempt), t = this.report(s)
            }
            switch (e) {
                case"package":
                    n.linkTo(c());
                    break;
                case"paycenter":
                    n.linkTo(x.paycenter);
                    break;
                case"weixin":
                case"h5pay":
                    t.always(function () {
                        n[e]()
                    });
                    break;
                case"custom":
                    n.$element.trigger("custom.hw.pay", $.extend({}, o, {
                        report: function (t) {
                            t = t.split(".")[0] + ".hw.pay", n.$element.triggerHandler(t)
                        }
                    }));
                    break;
                case"minipay":
                    n.minipay();
                    break;
                default:
                    return
            }
            n.$element.trigger("invoked.hw.pay", o)
        }
    }, s.prototype.getAidFromUrl = function () {
        var t = decodeURIComponent(txv.util.getUrlParam("aid"));
        return "package" === this.options.type ? "" : t
    }, s.prototype.generateMid = function () {
        return this.payOptions.mid || this.$element.attr("data-mp-mid")
    }, s.prototype._rebuildAid = function (t) {
        "use strict";
        function e(t) {
            for (var e, i = {}, o = /(\$\d+):[^$]*/g; null != (e = o.exec(t));)i[e[1]] = e[0];
            return i
        }

        function i(t) {
            var i = e(t);
            return o.replace(/\$\d+/g, function (t) {
                return i[t] || ""
            })
        }

        var o = "$2$4$5$12$13$1$7$11$15$6$3$8$9$10$14";
        return i(t)
    }, s.prototype.generateAid_new = function (t) {
        var e = [], i = [];
        e[0] = this.options.aid_version || "V0";
        var o = p();
        return "undefined" != typeof this.options.key1 || this.options._channel || this.$element.attr("_channel") ? i.unshift("1:" + (this.options.key1 || this.options._channel || this.$element.attr("_channel"))) : o.channel && i.unshift("1:" + o.channel), "undefined" != typeof this.options.key2 || this.options._platform || this.$element.attr("_platform") ? i.unshift("2:" + (this.options.key2 || this.options._platform || this.$element.attr("_platform"))) : "web" === m.getPageTypeName() ? i.unshift("2:1000") : "bp" === m.getPageTypeName() ? i.unshift("2:2000") : i.unshift("2:" + m.getPageType()), ("undefined" != typeof this.options.key3 || this.options._version || this.$element.attr("_version") || m.getPlatVersion()) && i.unshift("3:" + (this.options.key3 || this.options._version || this.$element.attr("_version") || m.getPlatVersion())), ("undefined" != typeof this.options.key4 || this.options._source || this.$element.attr("_source")) && i.unshift("4:" + (this.options.key4 || this.options._source || this.$element.attr("_source"))), ("undefined" != typeof this.options.key7 || this.options._pid || this.$element.attr("_pid")) && i.unshift("7:" + (this.options.key7 || this.options._pid || this.$element.attr("_pid"))), ("undefined" != typeof this.options.key8 || this.options._source2 || this.$element.attr("_source2")) && i.unshift("8:" + (this.options.key8 || this.options._source2 || this.$element.attr("_source2"))), "undefined" != typeof this.options.key11 || this.options._scene || this.$element.attr("_scene") ? i.unshift("11:" + (this.options.key11 || this.options._scene || this.$element.attr("_scene"))) : i.unshift("11:1"), ("undefined" != typeof this.options.key12 || this.options._pr || this.$element.attr("_pr") || o.pr) && i.unshift("12:" + (this.options.key12 || this.options._pr || this.$element.attr("_pr") || o.pr)), ("undefined" != typeof this.options.key13 || this.options._actid || this.$element.attr("_actid")) && i.unshift("13:" + (this.options.key13 || this.options._actid || this.$element.attr("_actid"))), ("undefined" != typeof this.options.key9 || this.options._typeid || this.$element.attr("_typeid")) && i.unshift("9:" + (this.options.key9 || this.options._typeid || this.$element.attr("_typeid"))), ("undefined" != typeof this.options.key10 || this.options._listid || this.$element.attr("_listid")) && i.unshift("10:" + (this.options.key10 || this.options._listid || this.$element.attr("_listid"))), ("undefined" != typeof this.options.key5 || this.options._cid || this.$element.attr("_cid") || "undefined" != typeof COVER_INFO && COVER_INFO.id) && i.unshift("5:" + (this.options.key5 || this.options._cid || this.$element.attr("_cid") || "undefined" != typeof COVER_INFO && COVER_INFO.id || "")), ("undefined" != typeof this.options.key6 || this.options._vid || this.$element.attr("_vid") || m.getVid()) && i.unshift("6:" + (this.options.key6 || this.options._vid || this.$element.attr("_vid") || m.getVid())), i.reverse(), e[1] = this._rebuildAid("$" + i.join("$")), e.join("$")
    }, s.prototype.generateAid = function (t) {
        if (this.isNewAidReport())return this.generateAid_new(t);
        var e = this.options.aid || this.getAidFromUrl() || this.$element.attr("_hot") || "", i = e.split("&"), o = i[0].split(w), t = this.options.source || m.getPtag();
        1 === o.length ? o.unshift(t) : o[0] || (o[0] = o[0] || t);
        var n = m.getPageTypeName() + ".";
        return 0 !== o[1].indexOf(n) && (o[1] = n + o[1]), o[2] = this.options.cid || m.getCid(), o[3] = this.options.vid || m.getVid(), i[0] = o.join(w), i.join("&")
    }, s.prototype.getURL = function (t) {
        t += "&n={amount}&ru={ru}&wxAppid={wxAppid}";
        var e = this.options;
        return t = o(t, {
            amount: e.amount,
            wxAppid: e.wxAppid,
            ru: encodeURIComponent(e.ru)
        }), e.uin && (t += "&u=" + e.uin), e.sandbox && (t += "&sandbox=" + e.sandbox), t
    }, s.prototype.getReu = function () {
        return this.getURL(x.weixin)
    }, s.prototype.getH5payURL = function () {
        var t = this.getURL(x.h5pay);
        return t += "&reu=" + encodeURIComponent(this.getReu()), this.options.ap && (t += "&ap=" + this.options.ap), t
    }, s.prototype.getWeixinURL = function () {
        var t = x.weixin + "&n={amount}&ru={ru}";
        return o(t, {amount: this.options.amount, ru: encodeURIComponent(this.options.ru)})
    }, s.prototype.wxGetURL = function () {
        return "weixin" === this.options.type ? this.getWeixinURL() : "h5pay" === this.options.type ? this.getH5payURL() : ""
    }, s.prototype.weixin = s.prototype.h5pay = function () {
        var t = this.wxGetURL();
        !v.isLogin() || v.isLowLogin() ? txv.login.openLogin(this.addAid(t), 1) : this.linkTo(t)
    }, s.prototype.addAid = function (t) {
        return txv.util.setUrlParam("aid", encodeURIComponent(this.generateAid()), t)
    }, s.prototype.linkTo = function (t) {
        var t = this.addAid(t), e = this.$element.attr("target") || this.options.target || "window";
        e = e.replace("_", ""), "blank" === e ? window.open(t) : window[e].location.href = t
    }, s.prototype.minipay = function () {
        function t() {
            var t, p = !1;
            s && v.showMask(), s && v.showMask(), t = function () {
                p && f(), v.hideMask()
            }, y.show(i).one("close", function () {
                var e = $.Event("close.hw.minipay");
                n.trigger(e), e.isDefaultPrevented() || t(), i.close && "function" == typeof i.close && i.close()
            }).on("notify", function (t, i) {
                "submit" === i.notifyType && e.report(o[1]), n.trigger("notify.hw.minipay", i)
            }).on("success", function (t, i) {
                p = !0, e.report("success"), n.trigger("success.hw.minipay", i)
            }).one("frameload", function () {
                e.report(o[0]), n.trigger("frameload.hw.minipay")
            })
        }

        var e = this, i = {}, o = [_.attempt, _.confirm], n = this.$element, s = this.options.showMask;
        if ($.each(["amount", "goplay", "zIndex", "close"], function (t, o) {
                null != e.options[o] && (i[o] = e.options[o])
            }), i = $.extend(i, {aid: e.generateAid()}, e.options, e.payOptions), !v.isLogin() || v.isLowLogin())if (v.isLogin()) {
            if (v.isLowLogin()) {
                var p = v.getLoginType();
                "qq" == p ? v.openLoginSingle({success: t}, "qq") : "wx" == p ? v.openLoginSingle({success: t}, "wx") : v.openLogin({success: t})
            }
        } else v.openLogin({success: t}); else t()
    }, s.prototype.report = function (t) {
        var e = "", i = "", o = [];
        if (this.isNewAidReport()) {
            e = this.generateAid_new(), i = this.generateMid(), t = t || _.attempt;
            var n = e.split("$$"), s = n[0], p = n[1].split("$"), a = {};
            return $.each(p, function (t, e) {
                var i = e.split(":");
                2 == i.length && (a[k["key" + i[0]]] = i[1])
            }), m.new_aid_action($.extend({
                aid: e,
                sOp: t,
                iPageid: this.options.pageType,
                sBiz: this.options.type,
                aid_version: s,
                mid: i
            }, a))
        }
        return e = this.generateAid(), o = e.split(w), t = t || _.attempt, m.action({
            aid: e,
            sOption: t,
            iPageid: this.options.pageType,
            sBiz: this.options.type,
            source: o[0],
            button: o[1],
            iQQ: this.options.uin
        })
    }, s.prototype.listen = function () {
        var t = this, e = ["success.hw.pay", "fail.hw.pay", "cancel.hw.pay", "confirm.hw.pay"], i = {};
        $.each(e, function (e, o) {
            t.$element.off(o), i[o] = function () {
                var e = o.split(".")[0], i = _[e];
                i && t.report(i)
            }
        }), this.$element.on(i)
    }, s.prototype.wx_show = function () {
        function t(t) {
            t.sourceSite = "video";
            var i = $.param(t), s = "";
            s = '<div class="mod_player_popbox mod_popup_v2" id="wx_pay_popup">', s += '    <iframe frameborder="0" allowtransparency="true" class="iframe_wrap" src="//film.qq.com/wx/wx_minipay.html?' + i + '" scrolling="no" style="width: ' + o + "px; height: " + n + 'px; z-index:10001;"></iframe>', s += "</div>", txv.login.showMask(), $("body").append(s), txv.util.showAtFstSrnCenter("#wx_pay_popup", o, n), $("#wx_pay_popup").off("close").on("close", function () {
                $("#wx_pay_popup").remove(), txv.login.hideMask(), e.$element.trigger("close.hlw.wx_minipay")
            }).off("pay_suc").on("pay_suc", function (t, i) {
                $("#wx_pay_popup").remove(), txv.login.hideMask(), e.$element.trigger("pay_suc.hlw.wx_minipay", i.msgtype)
            }).off("login_suc").on("login_suc", function (t, i) {
                e.$element.trigger("login_suc.hlw.wx_minipay")
            }).off("scan_suc").on("scan_suc", function () {
                e.$element.trigger("scan_suc.hlw.wx_minipay")
            }).off("switch_qq").on("switch_qq", function () {
                var e = $(this);
                e.remove(), txv.login.openLoginSingle({
                    success: function () {
                        txv.vip.getVipInfo().done(function (e) {
                            var i = e;
                            i.vip || $.pay(t)
                        })
                    }
                }, "qq")
            })
        }

        var e = this, i = this.options.type;
        switch (i) {
            case"package":
                return void this.linkTo(c());
            case"paycenter":
                return void this.linkTo(x.paycenter);
            case"minipay":
                break;
            default:
                return
        }
        var o = 620, n = 370;
        if (location.host.indexOf("cache.tv.qq.com") >= 0, this.options._scene = 2, this.options.aid_version = "V0", this.report(_.attempt), "wx" !== txv.login.getLoginType())return void $(this).pay();
        if (!document.getElementById("wx_pay_popup")) {
            var s = {};
            s.aid = this.options.aid ? this.options.aid : this.generateAid_new(), s.n = this.$element.attr("data-amount") || 3, s.pay_type = this.options.pay_type || 0, s.cid = this.options.cid || ("undefined" != typeof COVER_INFO ? COVER_INFO.id : ""), s.pageid = this.options.pageid || "", "diff" == this.options.pay_diff_tag && (s.n = 1, s.type = 0), "wx" === txv.login.getLoginType() ? (s.openid = txv.cookie.get("openid"), s.appid = txv.cookie.get("appid"), t(s)) : (s.uin = txv.login.getUin(), t(s))
        }
    }, d.prototype = {
        constructor: d, reporter: function () {
            return $.proxy(this.pay.report, this.pay)
        }, aid: function () {
            return this.pay.isNewAidReport() ? this.pay.generateAid_new() : this.pay.generateAid()
        }
    };
    var b = $.fn.pay;
    $.fn.pay = function (t) {
        return "string" == typeof t ? (pay = u(this[0]), new d(pay)[t]()) : (txv.login.isLogin() ? this.each(function () {
                    var e = u(this, t);
                    "wx" === txv.login.getLoginType() ? e.wx_show() : h(function () {
                            l(function () {
                                e.show()
                            })
                        }, function () {
                            e.show()
                        })
                }) : this.each(function () {
                    var e = u(this, t);
                    txv.login.openPayLogin($.extend({}, {
                        aid: new d(e).aid(),
                        _channel: $(this).attr("_channel"),
                        _source1: $(this).attr("_source"),
                        _source2: $(this).attr("_source2"),
                        _pid: $(this).attr("_pid"),
                        n: $(this).attr("data-amount") || $(this).attr("amount") || $(this).attr("mpMonth") || $(this).attr("month") || "",
                        mid: $(this).attr("_mid"),
                        ptag: txv.util.getUrlParam("ptag"),
                        success: function (t) {
                            "qq" === txv.login.getLoginType() && h(function () {
                                l(function () {
                                    e.show()
                                })
                            }, function () {
                                e.show()
                            })
                        },
                        pay_suc: function () {
                            f()
                        }
                    }, t))
                }), this)
    }, $.fn.pay.noConflict = function () {
        return $.fn.pay = b, this
    }, $.pay = function (t, e) {
        var i, o;
        return o = $.extend({}, s.DEFAULTS, "string" == typeof t ? {aid: t} : t), i = new s(document.documentElement, o), e ? new d(i)[e]() : void(txv.login.isLogin() ? "wx" === txv.login.getLoginType() ? i.wx_show() : h(function () {
                        l(function () {
                            i.show()
                        })
                    }, function () {
                        i.show()
                    }) : txv.login.openPayLogin($.extend({}, {
                    aid: new d(i).aid(),
                    n: o.n || o.amount || "",
                    ptag: txv.util.getUrlParam("ptag"),
                    success: function (t) {
                        "qq" === txv.login.getLoginType() ? h(function () {
                                l(function () {
                                    i.show()
                                })
                            }, function () {
                                i.show()
                            }) : txv.login.setStatus(!1, !1, "wx", txv.util.toJson(t))
                    },
                    pay_suc: function () {
                        f()
                    }
                }, o)))
    }, $(document).on("click.hw.pay.data-api", "[data-toggle=pay]", function (t) {
        t.preventDefault(), $(this).pay()
    }), $(document).on("pay_suc.hlw.wx_minipay", function (t, e) {
        1 == e && f()
    })
}, function (t, e) {
    function i(t) {
        var e = new Image, i = "";
        n.each(t, function (t, e) {
            i += t + "=" + e + "&"
        }), i += "rand=" + Math.random(), e.src = r + "?" + i
    }

    var o, n = window.jQuery || window.$j || window.$, s = n({}), p = ["//imgcache.qq.com/bossweb/ipay/js/api/cashier.js", "//vm.gtimg.cn/tencentvideo_v1/js/film/ipay_v2/api/cashier.js?v=20160719"], a = {
        width: 670,
        codes: "txsp",
        scene: "minipay",
        type: "service",
        aid: "txsp",
        amount: "3",
        channels: "qdqb,kj,weixin",
        zIndex: 10001
    }, r = "//pay.video.qq.com/fcgi-bin/payreport", c = {
        onLoad: function () {
            s.trigger("load")
        }, onFrameLoad: function () {
            s.trigger("frameload"), i("1" == arguments[1] ? {plat: 0, step: 1, uin: txv.login.getUin(), type: 4} : {
                    plat: 0,
                    step: 1,
                    uin: txv.login.getUin(),
                    type: 1
                })
        }, onCancel: function () {
            s.trigger("cancel"), i("1" == arguments[1] ? {plat: 0, step: 7, uin: txv.login.getUin(), type: 4} : {
                    plat: 0,
                    step: 7,
                    uin: txv.login.getUin(),
                    type: 1
                })
        }, onSuccess: function (t) {
            var e = "1*";
            t.autopay && 0 != t.autopay && (e = "3*"), i("1" == arguments[1] ? {
                    plat: 0,
                    step: 6,
                    uin: t.uin,
                    type: 4,
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    code_1: 0
                } : {
                    plat: 0,
                    step: 6,
                    uin: t.uin,
                    type: 1,
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    code_1: 0
                }), s.trigger("success", t)
        }, onError: function (t) {
            s.trigger("error", t);
            var e = "1*";
            t.autopay && 0 != t.autopay && (e = "3*"), i("1" == arguments[1] ? {
                    plat: 0,
                    step: 6,
                    uin: t.uin,
                    type: 4,
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    code_1: t.error_code,
                    msg: t.errmsg
                } : {
                    plat: 0,
                    step: 6,
                    uin: t.uin,
                    type: 1,
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    code_1: t.error_code,
                    msg: t.errmsg
                })
        }, onClose: function () {
            s.trigger("close").off()
        }, onNotify: function (t) {
            s.trigger("notify", t);
            var e = "1*";
            t.autopay && 0 != t.autopay && (e = "3*"), i("1" == arguments[1] ? {
                    plat: 0,
                    step: 5,
                    uin: txv.login.getUin(),
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    type: 4
                } : {
                    plat: 0,
                    step: 5,
                    uin: txv.login.getUin(),
                    payitem: e + 31 * t.amount,
                    paychannel: t.channel,
                    type: 1
                })
        }
    };
    s.setConfig = function (t) {
        return t = t || {}, t.aid && (t.aid = encodeURIComponent(t.aid)), n.extend(a, t), this
    }, s.getConig = function () {
        return n.extend({}, a)
    }, s.show = function (t) {
        t = n.extend({}, a, c, t);
        var e = p[1];
        return t.day && (t.amount = 1), "undefined" == typeof t.day && "undefined" == typeof t.month && (t.month = t.amount), t.sourceSite = "video", n.getScript(e).done(function () {
            var e = window.cashier.dialog.buy(t);
            e.show()
        }), this
    }, s.close = function () {
        return o && o.close(), this
    }, t.exports = s
}, function (t, e, i) {
    function o(t) {
        var e = $.extend(a.hlw_wx_pay, t);
        r ? n.show(e.id, e) : s.show(e.id, e)
    }

    var n = i(4), s = i(6), p = function () {
    }, a = {
        hlw_wx_pay: {
            url: "http://film.qq.com/weixin/wxlogin.html?",
            pay_type: 0,
            buy_type: 0,
            cid: "undefined" != typeof COVER_INFO ? COVER_INFO.id : parent.COVER_INFO ? parent.COVER_INFO.id : "",
            vid: "",
            ru: "",
            uin: txv.login.getUin(),
            n: 3,
            aid: "",
            mid: "",
            price: "",
            day: "",
            usewx: 0,
            code: "PC_WX_LOGIN",
            use_ws: !1,
            id: "qr_img",
            size: 150,
            open: p,
            scan_suc: p,
            login_suc: p,
            pay_suc: p,
            close: p,
            error: p
        }
    }, r = !1;
    window.WebSocket = window.WebSocket || window.MozWebSocket, window.WebSocket && (r = !0), $.pay_qrimg = function (t) {
        "wx" === txv.login.getLoginType() ? t.openid && t.appid ? o(t) : (t.openid = txv.cookie.get("openid") || "", t.appid = txv.cookie.get("appid") || "", o(t)) : t.uin || (t.uin = txv.login.getUin(), t.openid = "", t.appid = "", o(t))
    }, t.exports = $.pay_qrimg
}, function (t, e, i) {
    function o(t, e) {
        function i() {
            r = "wx" === txv.login.getLoginType() ? r + "&n=" + u + "&aid=" + encodeURIComponent(c) + "&type=" + l + "&appid=" + h + "&cid=" + f + "&vid=" + y + "&ru=" + encodeURIComponent(m) + "&buytype=" + g + "&openid=" + x + "&mid=" + _ + "&price=" + k + "&day=" + q + "&usewx=" + b + "&extendparam=" + R + "&pageid=" + pageid + "&sourceSite=" + sourceSite : r + "&n=" + u + "&aid=" + encodeURIComponent(c) + "&type=" + l + "&cid=" + f + "&vid=" + y + "&ru=" + encodeURIComponent(m) + "&buytype=" + g + "&u=" + v + "&mid=" + _ + "&price=" + k + "&day=" + q + "&usewx=" + b + "&extendparam=" + R + "&pageid=" + pageid + "&sourceSite=" + sourceSite, t.attr("src", p.qrcode + "size=" + (w || 150) + "&url=" + encodeURIComponent(r)), a = !0
        }

        function o(e) {
            r = "wx" === txv.login.getLoginType() ? p.scanreport + "code=" + d + "&n=" + u + "&msgtype=1&bid=10002&guid=" + e + "&cid=" + f + "&vid=" + y + "&ru=" + encodeURIComponent(m) + "&buytype=" + g + "&platform=8&aid=" + encodeURIComponent(c) + "&type=" + l + "&appid=" + h + "&openid=" + x + "&usewx=" + b + "&mid=" + _ + "&price=" + k + "&day=" + q + "&extendparam=" + R + "&pageid=" + pageid + "&sourceSite=" + sourceSite : p.scanreport + "code=" + d + "&n=" + u + "&msgtype=1&bid=10002&guid=" + e + "&cid=" + f + "&vid=" + y + "&ru=" + encodeURIComponent(m) + "&buytype=" + g + "&platform=8&aid=" + encodeURIComponent(c) + "&type=" + l + "&u=" + v + "&usewx=" + b + "&mid=" + _ + "&price=" + k + "&day=" + q + "&extendparam=" + R + "&pageid=" + pageid + "&sourceSite=" + sourceSite, t.attr("src", p.qrcode + "size=" + (w || 150) + "&url=" + encodeURIComponent(r)), a = !0
        }

        function s(t, e) {
            if (t.uin && t.uin !== txv.login.getUin()) $.ajax({
                url: p.vuser_cgi + "&t=2",
                dataType: "jsonp"
            }).done(function () {
                txv.cookie.set("uin", t.uin, "qq.com", "/"), txv.cookie.set("skey", t.skey, "qq.com", "/"), txv.cookie.set("luin", t.uin, "qq.com", "/", 168), txv.cookie.set("lskey", t.lskey, "qq.com", "/", 168), $.isFunction(e) && e(t)
            }).fail(function () {
            }), $.isFunction(e) && e(t); else if (t.openid) {
                var i = {};
                i.access_token = t && t.access_token, i.appid = t && t.appid, i.openid = t && t.openid, i.refresh_token = t && t.refresh_token, i.wx_nick = t && t.nick, i.wx_head = t && t.face;
                var o = txv.cookie.get("openid");
                $.ajax({url: p.vuser_cgi + "&t=1", dataType: "jsonp", data: i}).done(function (n) {
                    txv.cookie.set("main_login", "wx", location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("access_token", i.access_token, location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("appid", i.appid, location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("openid", i.openid, location.host, "/", txv.login.getConfig("cookieTime")), n && n.vuserid && n.vusession && (txv.cookie.set("vuserid", n.vuserid, location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("vusession", n.vusession, location.host, "/", txv.login.getConfig("cookieTime")), i.vuserid = n.vuserid, i.vusession = n.vusession, i.main_login = "wx"), t.openid && t.openid != o && $.isFunction(e) && e(t)
                }).fail(function () {
                    txv.cookie.set("main_login", "wx", location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("access_token", i.access_token, location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("appid", i.appid, location.host, "/", txv.login.getConfig("cookieTime")), txv.cookie.set("openid", i.openid, location.host, "/", txv.login.getConfig("cookieTime")), t._from = "hlw", t.openid && t.openid != o && $.isFunction(e) && e(t)
                })
            }
        }

        var a = !1, r = e.url, c = e.aid, d = e.code, u = e.n, h = e.appid || "", l = e.pay_type, g = e.buy_type || 0, f = e.cid, y = e.vid, m = e.ru, v = e.uin, x = e.openid || "", w = e.size, _ = e.mid, k = e.price, q = e.day, b = e.usewx, R = e.extendparam;
        if (pageid = e.pageid, sourceSite = e.sourceSite, t = $("#" + t), 0 == t.length && (t = $("#frm_poptip").contents().find("#qrimg_mini")), window.WebSocket = window.WebSocket || window.MozWebSocket, !window.WebSocket)return void i();
        if (!e.use_ws)return void i();
        setTimeout(function () {
            a || i()
        }, 3e3);
        var I = new n("//login.tv.qq.com/ws");
        I.begin();
        var U, T, L = new WebSocket(p.ws);
        L.onmessage = function (t) {
            var i = $.parseJSON(t.data), n = i.cmd, p = i.info, a = i.msgtype;
            if (0 != p.ret)return void I.reportErr(p.ret);
            if (101 == n) U = i.guid, U && o(U), I.reportSuc(); else if (300 == n); else if (400 == n) {
                var r = p.event;
                1 == r ? e.scan_suc(p) : 2 == r && (3 == a ? "video" != e.sourceSite && s(p, e.login_suc) : 1 != a && 2 != a || (p.msgtype = a, e.pay_suc(p)))
            }
        }, L.onopen = function () {
            L.send(JSON.stringify({cmd: 100, bid: 10002})), T = setInterval(function () {
                L.send(JSON.stringify({cmd: 300, bid: 10002, guid: U, info: {}}))
            }, 6e4), e.open()
        }, L.onclose = function (t) {
            T && clearInterval(T), e.close()
        }, L.onerror = function (t) {
            i(), I.reportErr(info.ret), e.error()
        }
    }

    var n = i(5), s = location.protocol, p = {
        ws: "https:" === s ? "wss://login.tv.qq.com" : "ws://login.tv.qq.com:8080",
        qrcode: "//pay.video.qq.com/fcgi-bin/qrencode?isNeedShort=1&",
        scanreport: s + "//pay.video.qq.com/fcgi-bin/scanreport?",
        host: s + "//film.qq.com",
        vuser_cgi: s + "//pay.video.qq.com/fcgi-bin/get_vuser_info?otype=json"
    };
    t.exports = {show: o}
}, function (t, e) {
    var i = {
        TYPE: {SUC: 1, ERR: 2},
        config: {cgi: "http://isdspeed.qq.com/cgi-bin/v.cgi", v4_cgi: "http://c.isdspeed.qq.com/code.cgi", sampling: 1},
        commCode: {error: 11, MQzone_Err: 12},
        report: function (t, e, o, n) {
            if (t && !(isNaN(e) || e < 1) && "undefined" != typeof o) {
                var s = this.config.cgi;
                s += "?flag1=" + t.toString() + "&flag2=" + e.toString() + "&1=" + i.config.sampling + "&2=" + o, n && (s += "&flag3=" + n.toString());
                var p = new Image;
                p.src = s
            }
        },
        getUrlPath: function (t) {
            var e = /(?:\?.*|#.*)/;
            return t = t.replace(e, ""), t = t.split("/"), {host: t[2], path: "/" + t.slice(3).join("/")}
        },
        report_v4: function (t, e, o, n, s) {
            if (!(isNaN(o) || o < 1) && "undefined" != typeof n) {
                var p = this.config.v4_cgi, s = s || "0";
                p += "?domain=" + t.toString() + "&cgi=" + e.toString() + "&type=" + o + "&rate=" + i.config.sampling + "&time=" + n + "&code=" + s.toString() + "&uin=" + (txv.cookie.get("uin") || txv.cookie.get("luin") || "").replace(/^o0*/g, "");
                var a = new Image;
                a.src = p
            }
        }
    }, o = function (t) {
        this.appid = t, this.timer = {begin: 0, end: 0}, this.isReported = !1, this.domain = "", this.path = "";
        var e = {};
        "string" == typeof t && 0 == t.indexOf("http") && (e = i.getUrlPath(t), e && e.host && (this.domain = e.host, this.path = e.path, this.appid = 0))
    };
    o.prototype = {
        begin: function () {
            this.timer.begin = (new Date).valueOf()
        }, end: function () {
            this.timer.end = this.timer.end || (new Date).valueOf()
        }, reprot: function (t, e) {
            this.report(t, e)
        }, report: function (t, e) {
            if (!this.isReported) {
                this.end();
                var o = this.timer.end - this.timer.begin;
                this.appid > 0 ? i.report(this.appid, t, o, e) : this.domain && i.report_v4(this.domain, this.path, t, o, e), this.isReported = !0
            }
        }, reprotSuc: function () {
            this.reportSuc()
        }, reportSuc: function () {
            this.report(i.TYPE.SUC)
        }, reportErr: function (t) {
            t = t || i.commCode.error, this.report(i.TYPE.ERR, t)
        }
    }, t.exports = o
}, function (t, e) {
    function i(t) {
        if ("object" == typeof t) {
            var e = "";
            for (val in t)"string" == typeof t[val] ? e += '"' + val + '":"' + t[val] + '",' : "number" == typeof t[val] ? e += '"' + val + '":' + t[val] + "," : "object" == typeof t[val] && (e += i(t[val]));
            return e = e.substr(0, e.length - 1), e = "{" + e + "}"
        }
    }

    function o(t) {
        var e = t;
        $.ajax({
            url: d.ws, dataType: "jsonp", data: "data=" + encodeURIComponent(i(e.options)), success: function (t) {
                if (t && 401 == t.cmd && t.data) {
                    var i = t.data;
                    for (var o in i)e.onMessage($.extend({}, {bid: t.bid, cmd: t.cmd, code: t.code}, i[o]))
                } else e.onMessage(t)
            }, error: function () {
                clearInterval(e.interval), e.defaultQRcode(), e.options.error(), e.options.close()
            }
        })
    }

    function n(t, e) {
        if (t.uin && t.uin !== txv.login.getUin()) $.ajax({
            url: "//pay.video.qq.com/fcgi-bin/get_vuser_info?otype=json&t=2",
            dataType: "jsonp"
        }).done(function () {
            txv.cookie.set("uin", t.uin, "qq.com", "/"), txv.cookie.set("skey", t.skey, "qq.com", "/"), txv.cookie.set("luin", t.uin, "qq.com", "/", 168), txv.cookie.set("lskey", t.lskey, "qq.com", "/", 168), $.isFunction(e) && e(t)
        }).fail(function () {
        }), $.isFunction(e) && e(t); else if (t.openid) {
            var i = {};
            i.access_token = t && t.access_token, i.appid = t && t.appid, i.openid = t && t.openid, i.refresh_token = t && t.refresh_token, i.wx_nick = t && t.nick, i.wx_head = t && t.face;
            var o = txv.cookie.get("openid");
            $.ajax({
                url: "//pay.video.qq.com/fcgi-bin/get_vuser_info?otype=json&t=1",
                dataType: "jsonp",
                data: i
            }).done(function (n) {
                txv.cookie.set("main_login", "wx", location.host, "/"), txv.cookie.set("access_token", i.access_token, location.host, "/"), txv.cookie.set("openid", i.openid, location.host, "/"), txv.cookie.set("appid", i.appid, location.host, "/"), n && n.vuserid && n.vusession && (txv.cookie.set("vuserid", n.vuserid, location.host, "/"), txv.cookie.set("vusession", n.vusession, location.host, "/"), i.vuserid = n.vuserid, i.vusession = n.vusession), t.openid && t.openid != o && $.isFunction(e) && e(t)
            }).fail(function () {
                txv.cookie.set("main_login", "wx", location.host, "/"), txv.cookie.set("access_token", i.access_token, location.host, "/"), txv.cookie.set("openid", i.openid, location.host, "/"), txv.cookie.set("appid", i.appid, location.host, "/"), t._from = "hlw", t.openid && t.openid != o && $.isFunction(e) && e(t)
            })
        }
    }

    function s(t, e) {
        this.$element = $("#" + t), this.options = e, this.interval = null, this.retry = 0
    }

    function p(t, e) {
        var i = new s(t, e);
        i.show()
    }

    var a = {connect: 100, communicate_req: 400}, r = {
        connected: 101,
        communicate_resp: 401
    }, c = location.protocol, d = {
        ws: "//login.tv.qq.com:8080/poll",
        qrcode: "//pay.video.qq.com/fcgi-bin/qrencode?isNeedShort=1&",
        scanreport: [c, "//pay.video.qq.com/fcgi-bin/scanreport?"].join(""),
        host: "//film.qq.com",
        max_retry: 2
    };
    s.prototype.defaultQRcode = function () {
        var t = "";
        t = "wx" === txv.login.getLoginType() ? this.options.url + "&aid=" + encodeURIComponent(this.options.aid) + "&type=" + this.options.type + "&appid=" + this.options.appid + "&cid=" + this.options.cid + "&vid=" + this.options.vid + "&ru=" + encodeURIComponent(this.options.ru) + "&buytype=" + this.options.buy_type + "&u=" + this.options.uin + "&openid=" + this.options.openid + "&usewx=" + this.options.usewx + "&mid=" + this.options.mid + "&price=" + this.options.price + "&day=" + this.options.day + "&extendparam=" + this.options.extendparam + "&pageid=" + this.options.pageid + "&sourceSite=" + this.options.sourceSite : this.options.url + "&n=" + this.options.n + "&aid=" + encodeURIComponent(this.options.aid) + "&type=" + this.options.type + "&cid=" + this.options.cid + "&vid=" + this.options.vid + "&ru=" + encodeURIComponent(this.options.ru) + "&buytype=" + this.options.buy_type + "&u=" + this.options.uin + "&usewx=" + this.options.usewx + "&mid=" + this.options.mid + "&price=" + this.options.price + "&day=" + this.options.day + "&extendparam=" + this.options.extendparam + "&pageid=" + this.options.pageid + "&sourceSite=" + this.options.sourceSite, this.$element.attr("src", "//pay.video.qq.com/fcgi-bin/qrencode?isNeedShort=1&size=" + (this.options.size || 150) + "&url=" + encodeURIComponent(t))
    }, s.prototype.onMessage = function (t) {
        var e = t.cmd, i = t.guid, o = t.info, s = t.msgtype, p = t.code;
        if (t.errno && 0 != t.errno)return void(this.options.cmd == a.connect && (this.retry < d.max_retry ? this.retry++ : (clearInterval(this.interval), this.defaultQRcode(), this.options.error(), this.options.close())));
        if (e == r.connected) {
            if (this.options.guid = i, this.options.cmd = a.communicate_req, i) {
                var c = "";
                c = "wx" === txv.login.getLoginType() ? d.scanreport + "code=" + this.options.code + "&msgtype=1&bid=10002&guid=" + i + "&cid=" + this.options.cid + "&platform=8&aid=" + encodeURIComponent(this.options.aid) + "&type=" + this.options.pay_type + "&appid=" + this.options.appid + "&vid=" + this.options.vid + "&ru=" + encodeURIComponent(this.options.ru) + "&buytype=" + this.options.buy_type + "&u=" + this.options.uin + "&openid=" + this.options.openid + "&usewx=" + this.options.usewx + "&mid=" + this.options.mid + "&price=" + this.options.price + "&day=" + this.options.day + "&extendparam=" + this.options.extendparam + "&pageid=" + this.options.pageid + "&sourceSite=" + this.options.sourceSite : d.scanreport + "code=" + this.options.code + "&n=" + this.options.n + "&msgtype=1&bid=10002&guid=" + i + "&cid=" + this.options.cid + "&platform=8&aid=" + encodeURIComponent(this.options.aid) + "&type=" + this.options.pay_type + "&vid=" + this.options.vid + "&ru=" + encodeURIComponent(this.options.ru) + "&buytype=" + this.options.buy_type + "&u=" + this.options.uin + "&usewx=" + this.options.usewx + "&mid=" + this.options.mid + "&price=" + this.options.price + "&day=" + this.options.day + "&extendparam=" + this.options.extendparam + "&pageid=" + this.options.pageid + "&sourceSite=" + this.options.sourceSite, this.$element.attr("src", d.qrcode + "size=" + (this.options.size || 150) + "&url=" + encodeURIComponent(c))
            }
            this.options.open()
        } else if (e == r.communicate_resp) {
            if (p == -1)return;
            var u = o.event;
            1 == u ? this.options.scan_suc(o) : 2 == u && (3 == s ? "video" != this.options.sourceSite && n(o, this.options.login_suc) : 1 != s && 2 != s || (o.msgtype = s, this.options.pay_suc(o)))
        }
    }, s.prototype.show = function () {
        var t = this;
        return this.options.use_ws ? (this.options.cmd = a.connect, this.options.bid = 10002, o(t), void(this.interval = setInterval(function () {
                o(t)
            }, 3e3))) : void this.defaultQRcode()
    };
    t.exports = {show: p}
}, function (t, e) {
    function i(t) {
        var e = document.createElement("a");
        return e.href = t, e
    }

    function o() {
    }

    function n() {
    }

    function s() {
        location.hostname;
        return a(p())
    }

    function p() {
        var t = document.referrer;
        return t ? i(t).hostname : ""
    }

    function a(t) {
        var e = /\./g;
        return t.replace(e, "_")
    }

    function r() {
        var t = "";
        location.hostname;
        return t
    }

    function c() {
        var t = n(), e = s();
        return {ptag: t, reffer: e}
    }

    function d() {
        var t = o(), e = p(), i = location.hostname;
        return "film.qq.com" === i || u() && t && "v.qq.com" !== e ? t : a(i)
    }

    function u() {
        return !!(k && k.length > 0)
    }

    function h(t) {
        return u() ? k[1] : ""
    }

    function l(t, e) {
        e = e || location.href;
        var i, o = new RegExp("[?&#]" + t + "=([^&#]+)", "gi"), n = e.match(o);
        return n && n.length > 0 ? (i = n[n.length - 1].split("="), i && i.length > 1 ? i[1] : "") : ""
    }

    function g(t) {
        t = t || window.location.toString();
        var e, i = l("vid", t) || l("videoid", t);
        return i || (e = t.match(/\/\w{15}\/(\w+)\.html/)) && (i = e[1]), encodeURIComponent(i)
    }

    function f() {
        var t = parseInt(w.get("uin").replace(/^o0*/g, ""), 10);
        return (!t || t <= 1e4) && (t = parseInt(w.get("luin").replace(/^o0*/g, ""), 10), (!t || t <= 1e4) && (t = 0)), t
    }

    function y(t, e, i) {
        var o = {};
        return $.each(t.split(" "), function (t, e) {
            o[e] = ""
        }), $.extend(o, e), function (t) {
            var e = $.Deferred(), n = $.extend({}, o, t), s = new Image, p = [], a = encodeURIComponent;
            return txv.login.getLoginType && "wx" === txv.login.getLoginType() ? (n.openid = n.openid || txv.cookie.get("openid"), n.appid = n.appid || txv.cookie.get("appid"), n.vuserid = n.vuserid || txv.cookie.get("vuserid"), n.logintype = "wx") : (n.iQQ = n.iQQ || f(), n.logintype = txv.login.isLogin() ? "qq" : ""), $.each(n, function (t, e) {
                p[i[t]] = a(t) + "=" + a(e)
            }), p.push("rand=" + Math.random()), s.src = b + "?" + p.join("&"), s.onload = function () {
                e.resolve()
            }, s.onerror = function () {
                e.reject()
            }, e.promise()
        }
    }

    function m() {
        if ("cache.tv.qq.com" === location.hostname)return "bp";
        var t = location.pathname;
        return 0 === t.indexOf("/weixin/") ? "wx" : 0 === t.indexOf("/app/") ? "app" : 0 === t.indexOf("/tv/") ? "tv" : "web"
    }

    var v, x, w = txv.cookie, _ = new RegExp("^/(?:cover|weixin/detail)/\\w/(\\w{15})(/\\w{11})?.html"), k = _.exec(location.pathname), q = {
        ".*baidu.*": 2,
        ".*douban.*": 3,
        "^v_qq_com": 1,
        "^inner": 1,
        "^film_qq_com": 6,
        "^aio": 4,
        "^edu_qq_com": 5,
        "^auto_qq_com": 5,
        "^finance_qq_com": 5,
        "^games_qq_com": 5,
        "^health_qq_com": 5,
        "^pay_qq_com": 5,
        "^t_qq_com": 5,
        "^news_qq_com": 5,
        "^ent_qq_com": 5,
        "^fashion_qq_com": 5,
        "^astro_fashion_qq_com": 5,
        "^www_qq_com": 5,
        "^ylpd": 5,
        "^pay.txsp$": 7,
        "wallet.": 8,
        "ipay.wallet.qqtips": 8,
        "^mail.": 9,
        "^tips.": 10
    }, b = "//btrace.qq.com/kvcollect", R = 1, I = {web: 1, bp: 2, act: 3, wx: 4, app: 5, tv: 6}, U = {
        BossId: 0,
        Pwd: 1,
        sIp: 2,
        iQQ: 3,
        sBiz: 4,
        sOp: 5,
        iSta: 6,
        iTy: 7,
        iFlow: 8,
        sUrl: 9,
        sRef: 10,
        iPageid: 11,
        aid: 12,
        sOption: 13,
        button: 14,
        source: 15,
        cid: 16,
        vid: 17,
        sExt1: 18,
        sExt2: 19,
        openid: 20,
        appid: 21,
        vuserid: 22,
        logintype: 23
    }, T = {
        BossId: 0,
        Pwd: 1,
        sIp: 2,
        iQQ: 3,
        sBiz: 4,
        sOp: 5,
        iSta: 6,
        iTy: 7,
        iFlow: 8,
        surl: 9,
        sref: 10,
        ipageid: 11,
        source: 12,
        openid: 13,
        appid: 14,
        vuserid: 15,
        logintype: 16
    }, L = {
        BossId: 0,
        Pwd: 1,
        sIp: 2,
        iQQ: 3,
        sBiz: 4,
        sOp: 5,
        iSta: 6,
        iTy: 7,
        iFlow: 8,
        sUrl: 9,
        sRef: 10,
        iPageid: 11,
        cid: 12,
        vid: 13,
        channel: 14,
        platform: 15,
        version: 16,
        source1: 17,
        pid: 18,
        source2: 19,
        typeid: 20,
        listid: 21,
        aid_version: 22,
        mid: 23,
        scene: 24,
        pr: 25,
        openid: 26,
        appid: 27,
        vuserid: 28,
        logintype: 29
    };
    reportAction2 = y("BossId Pwd sIp iQQ sBiz sOp iSta iTy iFlow sUrl sRef iPageid cid vid channel platform version source1 pid source2 typeid listid aid_version mid scene pr openid appid vuserid logintype", {
        BossId: 2928,
        Pwd: 1533213083,
        iTy: 2928,
        sUrl: location.href,
        sRef: document.referrer,
        iPageid: R,
        cid: h()
    }, L), v = y("BossId Pwd sIp iQQ sBiz sOp iSta iTy iFlow sUrl sRef iPageid aid sOption button source cid vid sExt1 sExt2 openid appid vuserid logintype", {
        BossId: 2051,
        Pwd: 0,
        iTy: 2051,
        sUrl: location.href,
        sRef: document.referrer,
        iPageid: R,
        cid: h()
    }, U), x = y("BossId Pwd sIp iQQ sBiz sOp iSta iTy iFlow surl sref ipageid source openid appid vuserid logintype", {
        BossId: 2063,
        Pwd: 0,
        iTy: 2063,
        surl: location.href,
        sref: document.referrer,
        ipageid: R
    }, T), t.exports = {
        getPtag: d, getPtagAndReffer: c, action: v, new_aid_action: reportAction2, pv: function (t, e) {
            var i = {source: e || d(), ipageid: t || R, sOp: "source_pv"};
            return x(i)
        }, PAGE_TYPE: I, getPageType: function () {
            return I[m()] || I.web
        }, getPageTypeName: m, getCid: h, getVid: g, KeyMap: q, getPlatVersion: r
    }
}, function (t, e) {
    $(document);
    $.extend(txv.login.config, {default_pay_qr_url: "http://film.qq.com/wx/wx_login.html"}), txv.login.getLoginType || (txv.login.getLoginType = function () {
        return txv.cookie.get("main_login")
    }), txv.login.openPayLogin = function (t) {
        txv.login.config.wxLoginUrl = "";
        var e = {
            url: t && t.url,
            aid: t && t.aid || "",
            code: t && t.code,
            n: t && t.n,
            id: t && t.id,
            use_ws: t && t.use_ws,
            pay_type: t && t.pay_type,
            pageid: t && t.pageid,
            sourceSite: t && t.sourceSite,
            _channel: t._channel || "",
            _source1: t._source1 || "",
            _source2: t._source2 || "",
            _pid: t._pid || "",
            mid: t.mid || "",
            ptag: t.ptag || ""
        };
        window.hlw_login_cb = {};
        var i = {}, o = (t.isLowLogin, txv.login.getLoginType()), n = "";
        "qq" == o ? n = "qq" : "wx" == o && (n = "wx");
        for (key in t)e.hasOwnProperty(key) || ("function" == typeof t[key] && (window.hlw_login_cb[key] = t[key]), i[key] = t[key]);
        n.length > 0 ? txv.login.openLoginSingle(i, n) : txv.login.openLogin(i)
    }, txv.login.addCloseLoginCallback(function () {
        txv.login.config.wxLoginUrl = ""
    }), t.exports = txv.login.openPayLogin
}]);